home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / iMapEntity.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  6KB  |  259 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // imapentity.h
  5. //
  6. // API for the package imapentity - functions for manipulation of game geography
  7. // entities such as celestial bodies, habitats and Lagrange points.
  8. //
  9. // Revision control information:
  10. //
  11. // $Header:
  12. //
  13.  
  14. #include "Flux.h"
  15.  
  16. #ifdef FLUX_COMPILE
  17.  
  18. FLUX_DECLARE_EXTENSION(iMapEntity);
  19.  
  20. #ifdef FLUX_LIB
  21. #if _MSC_VER >= 1000
  22. #pragma comment( lib, "imapentity" )
  23. #endif // _MSC_VER >= 1000
  24. #endif // FLUX_LIB
  25.  
  26. #else
  27.  
  28. // Dependencies
  29. uses iSim, Set, MapEnumerations;
  30.  
  31. // Declare handle types - actually an hwaypoint but maintained for backward
  32. // compatability
  33. handle hmapentity : hisim;
  34.  
  35. // System level functions //////////////////////////////////////////////////////
  36.  
  37. //
  38. // hmapentity Cast( hobject thing )
  39. //
  40. // Cast a handle up to a map entity handle.
  41. //
  42. prototype hmapentity iMapEntity.Cast( hobject thing );
  43.  
  44. //
  45. // string SystemName()
  46. //
  47. // Get the system name.
  48. //
  49. prototype string iMapEntity.SystemName();
  50.  
  51. //
  52. // hmapentity SystemCentre()
  53. //
  54. // Get the system centre.
  55. //
  56. prototype hmapentity iMapEntity.SystemCentre();
  57.  
  58. //
  59. // hmapentity SystemCentreForSystem( string name )
  60. //
  61. // Get the system centre for a given system.
  62. //
  63. prototype hmapentity iMapEntity.SystemCentreForSystem( string name );
  64.  
  65. //
  66. // set SystemHabitats()
  67. //
  68. // Get a set of all habitats in the active system.
  69. //
  70. prototype set iMapEntity.SystemHabitats();
  71.  
  72. //
  73. // set SystemHabitatsInSystem( string name )
  74. //
  75. // Get a set of all habitats in the given system.
  76. //
  77. prototype set iMapEntity.SystemHabitatsInSystem( string name );
  78.  
  79. //
  80. // set SystemBodies()
  81. //
  82. // Get a set of all celestial bodies in the system.
  83. //
  84. prototype set iMapEntity.SystemBodies();
  85.  
  86. //
  87. // set SystemBodiesInSystem( string name )
  88. //
  89. // Get a set of all celestial bodies in the given system.
  90. //
  91. prototype set iMapEntity.SystemBodiesInSystem(string name);
  92.  
  93. //
  94. // set SystemLagrangePoints()
  95. //
  96. // Get a set of all Lagrange points in the system.
  97. //
  98. prototype set iMapEntity.SystemLagrangePoints();
  99.  
  100. //
  101. // set SystemLagrangePointsInSystem( string name )
  102. //
  103. // Get a set of all Lagrange points in the given system.
  104. //
  105. prototype set iMapEntity.SystemLagrangePointsInSystem(string name);
  106.  
  107. //
  108. // set SystemEntities()
  109. //
  110. // Get a set of all entities in the system.
  111. //
  112. prototype set iMapEntity.SystemEntities();
  113.  
  114. //
  115. // set SystemEntitiesForSystem()
  116. //
  117. // Get a set of all entities in a given system.
  118. //
  119. prototype set iMapEntity.SystemEntitiesForSystem(string name);
  120.  
  121. // Generic map entity functions ////////////////////////////////////////////////
  122.  
  123. //
  124. // string Name( mapentity entity )
  125. //
  126. // Get the name for a given map entity.
  127. //
  128. prototype string iMapEntity.Name( hmapentity entity );
  129.  
  130. //
  131. // hmapentity Parent( hmapentity entity )
  132. //
  133. // Get the parent entity for this entity.
  134. //
  135. prototype hmapentity iMapEntity.Parent( hmapentity entity );
  136.  
  137. //
  138. // set Children( hmapentity entity )
  139. //
  140. // Get a set of the children of a given map entity.
  141. //
  142. prototype set iMapEntity.Children( hmapentity entity );
  143.  
  144. //
  145. // hsim SimForEntity( hmapentity entity )
  146. //
  147. // Get the sim representing the given entity. Note that not all entities will
  148. // have a physical representation sim.
  149. //
  150. prototype hsim iMapEntity.SimForEntity( hmapentity entity );
  151.  
  152. //
  153. // hsim WaypointForEntity( hmapentity entity )
  154. //
  155. // Get a handle to the waypoint for a given entity.
  156. //
  157. prototype hsim iMapEntity.WaypointForEntity( hmapentity entity );
  158.  
  159. //
  160. // float EntityToEntityDistance( hmapentity e1, hmapentity e2 )
  161. //
  162. // Get the distance between two map entities. Takes entity sizes into account.
  163. //
  164. prototype float iMapEntity.EntityToEntityDistance( hmapentity e1, hmapentity e2 );
  165.  
  166. //
  167. // float EntityToSimDistance( hmapentity entity, hsim sim )
  168. //
  169. // Get the distance between a map entity and a sim. Takes entity size into 
  170. // account.
  171. //
  172. prototype float iMapEntity.EntityToSimDistance( hmapentity entity, hsim sim );
  173.  
  174. //
  175. // set ShipsInRadius( hhabitat habitat, float radius )
  176. //
  177. // Get a set of all ships within a given radius of the given entity.
  178. //
  179. prototype set iMapEntity.ShipsInRadius( hmapentity entity, float radius );
  180.  
  181. //
  182. // IeAllegiance CastIntToAllegiance( int index )
  183. //
  184. // Cast an int up to a member of the allegiance enumerator
  185. //
  186. prototype IeAllegiance iMapEntity.CastIntToAllegiance( int index );
  187.  
  188. //
  189. // float RadiusOfInfluence( hmapentity entity )
  190. //
  191. // Retuns the radius of influence of a map entity.  Note that lagrange points
  192. // currently have no radius of influence
  193. //
  194. prototype float iMapEntity.RadiusOfInfluence( hmapentity entity );
  195.  
  196. //
  197. // hmapentity FindByName( string name )
  198. //
  199. // Try to find an entity in the system with the given name.
  200. //
  201. prototype hmapentity iMapEntity.FindByName( string name );
  202.  
  203. //
  204. // hmapentity FindByNameInSystem( string name, string system )
  205. //
  206. // Try to find an entity in the given system with the given name.
  207. //
  208. prototype hmapentity iMapEntity.FindByNameInSystem( string name, string system );
  209.  
  210. //
  211. // SetMapVisibility( hmapentity waypoint, bool visible )
  212. //
  213. // Sets the map visibility of the given map entity
  214. //
  215. prototype iMapEntity.SetMapVisibility( hmapentity waypoint, bool visible );
  216.  
  217. //
  218. // IsVisible( hmapentity waypoint )
  219. //
  220. // Returns true if we are visible
  221. //
  222. prototype bool iMapEntity.IsVisibleOnMap( hmapentity waypoint );
  223.  
  224. //
  225. // SetHidden( hmapentity waypoint, bool hidden )
  226. //
  227. // Set to true if we are hidden, false otherwise
  228. //
  229. prototype iMapEntity.SetHidden( hmapentity waypoint, bool hidden );
  230.  
  231. //
  232. // IsHidden( hmapentity waypoint )
  233. //
  234. // Returns true or false depending on whether or not we are hidden
  235. //
  236. prototype bool iMapEntity.IsHidden( hmapentity waypoint );
  237.  
  238. //
  239. // SetDestroyed( hmapentity waypoint, bool destroyed )
  240. //
  241. // Changes the destroyed status of geography
  242. //
  243. prototype iMapEntity.SetDestroyed( hmapentity waypoint, bool destroyed );
  244.  
  245. //
  246. // IsDestroyed( hmapentity waypoint )
  247. //
  248. // Returns true or false depending on whether or not we have been registered
  249. // as destroyed
  250. //
  251. prototype bool iMapEntity.IsDestroyed( hmapentity waypoint );
  252.  
  253.  
  254. prototype int  iMapEntity.GeogIndex( hmapentity entity );
  255.  
  256.  
  257.  
  258. #endif // FLUX_LIB
  259.